1. Field of the Invention
The present invention pertains to the field of computing devices having displays. Specifically, the present invention pertains to the field of bitmapped graphics systems which are used by applications running on computing devices to write into a display device.
2. Discussion of the Related Art
A frame buffer is a memory space used to represent a bitmapped image for display. A hardware frame buffer is a frame buffer that is accessed by a hardware display device to display an image on a screen. A logical frame buffer is a frame buffer that can be used by applications to draw into. In some instances, the logical frame buffer and hardware frame buffer are coincident, in other words are the same frame buffer. A given computer system will often have multiple logical frame buffers, for example in a window-based computing system, while having only one or a small number of hardware frame buffers.
Computing devices having displays thus often include a hardware frame buffer which is readable by a hardware display device. However, the orientation of the hardware frame buffer to the actual display pixel matrix often varies from device to device. Another peculiarity of display systems include the fact that in some devices the hardware frame buffer is not directly addressable as a memory mapped space by the processor of the device. Yet another complication arises in the context of complex computing systems, wherein more than one application may be permitted to write into a single logical frame buffer. In this case, controlled access to the logical frame buffer may be required. Still another complication arises in the context of a device having a software cursor, in which it is desirable to restore the portion of the image masked over by the cursor before altering the image, and then to redraw the cursor after the image has been altered.
Conventionally, these and other peculiarities of display systems must be handled by meticulous construction of the graphics portion of applications by the application programmer. The solutions to these problems frequently occupies a large program space and requires extensive programming effort. Moreover, the programming effort must be duplicated in large part for each different type of hardware device for which the application is anticipated to run on.
As is apparent from the above discussion, a need exists for providing a uniform, standardized graphics interface for applications to write into, without needing to worry about all the potentially variable details of the actual display device. A need also exists for a method for generating a uniform, standardized graphics system for a particular device without requiring excessive programming effort or program space to implement the graphics system.
Computing devices often include a hardware frame buffer which is readable by a hardware display device. However, the orientation of the hardware frame buffer to the actual display pixel matrix often varies from device to device. Another peculiarity of display systems include the fact that in some devices the hardware frame buffer is not directly addressable as a memory mapped space by the processor of the device. Conventionally, these and other peculiarities of display systems must be handled by meticulous construction of the graphics portion of applications by the application programmer. An object of the present invention is to provide a uniform, standardized graphics interface for applications to write into, without needing to worry about all the potentially variable details of the actual display device. Another object of the present invention is to provide a method for generating a uniform, standardized graphics system for a particular device without requiring excessive programming effort or program space to implement the graphics system.
According to an aspect of the present invention, a method for implementing a bitmapped graphics system involves creating a logical frame buffer for a program, such as an application or operating system. The method attaches a standardization operation to the logical frame buffer, so that the standardization operation is automatically executed upon the invocation of a draw function by the application. The standardization operation serves to perform all of the functions required to properly transmit the contents of the logical frame buffer into the hardware frame buffer. The standardization operation also arbitrates access to the logical frame buffer, if desired, and performs other useful logical operations.
In the preferred embodiment, the standardization operation comprises a pre-process and a post-process; thus, the pre-process and post-process are complementary to one other. The pre-process is invoked prior to the execution of a graphics system draw operation. The post-process is invoked after the execution of the graphics system draw operation. The pre-process and post-process may include more than one distinct pre-function and post-function. Pre-functions are executed in the order in which they are installed (FIFO) and post-functions are executed in the reverse order of installation (LIFO). This provides robustness and permits the functions to be arbitrarily combined as required by the peculiarities of the hardware display device.
According to another aspect of the present invention, a device executes an application draw function using the above-described uniform, standardized graphic system. The graphics system receives an invocation of the application draw function from the application, performs the pre-process, performs the actual graphics system draw operation into the logical frame buffer, and then executes the post-process.
For example, a complementary pre-process and post-process according to the present invention removes the complexity of dealing with hiding the cursor prior to drawing into the frame buffer and showing the cursor after drawing into the frame buffer, as is frequently required for software cursor implementations. A pre-process removes the cursor from the logical frame buffer, replacing it with the image the cursor had covered. A post-process redraws the cursor into the logical frame buffer after the application draw has finished.
Another example involves handling communication peculiarities, such as transporting the contents of the logical frame buffer across a parallel port to a hardware frame buffer which is not directly addressable by the processor. Yet another example involves logical frame buffer rotation to counteract peculiar rotation states wired into the hardware frame buffer. Still another example involves arbitrating access to a logical frame buffer which is accessible by more than one application.
These and other features, aspects, and advantages of the present invention are fully discussed in the Detailed Description of the Invention which describes the Figures in narrative form, in which like parts are designated with like reference numerals.